export default [
    {
        path: "/",
        redirect: "/default",
    },
    {
        path: "/default",
        // component: function(){
        //     // import vue环境提供的 特殊文件加载方法，功能等效于模块语法 import from
        //     return import("@/views/DefaultPage/DefaultPage.vue")
        // }
        component: () => import("@/views/DefaultPage/DefaultPage.vue")
    },
    {
        path: "/sing",
        component: () => import("@/views/SingFilePage/SingFilePage.vue")
    },
    {
        path: "/file",
        component: () => import("@/views/FileModePage/FileModePage.vue")
    },
    {
        path: "/error",
        component: () => import("@/views/ErrorPage/ErrorPage.vue")
    },
    {
        path: "/style",
        component: () => import("@/views/StylePage/StylePage.vue")
    },
    {
        path: "/build",
        component: () => import("@/views/BuildPage/BuildPage.vue")
    },
    {
        path: "/ajax",
        component: () => import("@/views/AjaxPage/AjaxPage.vue"),
        // 在当前主路由下定义子路由组件
        children: [
            {
                path: "",
                redirect: "/base"
                // redirect:"/ajax/util"
            },
            {
                path: "/base",
                component: () => import("@/views/AjaxPage/components/BaseUseAxios.vue")
            },
            {
                path: "/test/module",
                component: () => import("@/views/AjaxPage/components/ModuleUseAxios.vue")
            },
            {
                path: "util",
                component: () => import("@/views/AjaxPage/components/UtilUseAxios.vue")
            },
            {
                path: "test/proxy",
                component: () => import("@/views/AjaxPage/components/AjaxUseProxy.vue")
            },
            {
                path: ":errorPath(.*)*",
                component: () => import("@/views/NotFound/NotFound.vue")
            }
        ]
    },
    {
        path: "/route",
        component: () => import("@/views/RoutePage/RoutePage.vue"),
        children: [
            {
                path: "link",
                component: () => import("@/views/RoutePage/components/RouterLinkView.vue")
            },
            {
                path: ":errorPath(.*)*",
                component: () => import("@/views/NotFound/NotFound.vue")
            }
        ]
    },
    {
        path: "/element",
        component: () => import("@/views/ElementUIPage/ElementUIPage.vue")
    },
    // {
    //     path:"/:errorPath(.*)*",
    //     redirect:"/default"
    // }
    {
        path: "/:errorPath(.*)*",
        component: () => import("@/views/NotFound/NotFound.vue")
    },
]